<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>18  vue数组</title>
    <script src="./js/vue.js"></script>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        .table{
            width: 400px;
            height: auto;
            margin: 20px auto;
        }
        .table .item{
            float: left;
            width: 100px;
            background-color: midnightblue;
            color: mistyrose;
            line-height: 50px;
            height: 50px;
            text-align: center;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="table">
            <div class="tr">
                <div class="item">id</div>
                <div class="item">姓名</div>
                <div class="item">性别</div>
                <div class="item">操作</div>
            </div>
            <div class="tr"  v-for =  "item in list"  :key = "item.id">
                <div class="item">{{item.id}}</div>
                <div class="item">{{item.username}}</div>
                <div class="item">{{item.userage}}</div>
                <div class="item">删除</div>
            </div>
        </div>
    </div>
    
</body>
    <script>
        new Vue({
            el : "#app",
            data : {
                list : [{id : 1 , username : "sean" , userage : 18} , {id : 2 , username : "lulu" , userage : 18} , {id : 1 , username : "lala" , userage : 18}]

            },
            methods : {

            }
        })

    </script>
</html>